home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 September / Ahoy_Magazine_87-09_1987_Double_L_Side_A.d64 / Binary to GEOS (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  992b  |  38 lines

  1. 100 rem* binary to geos v1.0 from ahoy!!
  2. 110 rem* (e)ngendered by  shawn k. smith
  3. 120 pn$="ps to geos":data 000,006,087,003,008,004,030
  4. 130 ford=1to16:p$=p$+chr$(160):next
  5. 140 pn$=mid$(pn$+p$,1,16):z$=chr$(0)
  6. 150 ford=1to7:read di(d):next
  7. 160 printchr$(147):print:print
  8. 170 input"enter name of binary file";b$
  9. 180 open1,8,15,"i0":open8,8,8,b$+",p,r"
  10. 190 gosub220:gosub250:gosub390
  11. 200 print:printchr$(18)pn$" converted!"
  12. 210 close8:close1:end
  13. 220 input#1,e,e$,a$,a$:ife=0thenreturn
  14. 230 print:print"***";e;e$;" ***"
  15. 240 close8:close1:end
  16. 250 print:print"working . . .":print
  17. 260 t=18:s=1:close8:open8,8,8,+"#"
  18. 270 print#1,"u1"8;0;t;s:gosub220
  19. 280 print#1,"b-p"8;0:get#8,nt$,ns$
  20. 290 fortb=2to228step32:dn$=""
  21. 300 print#1,"b-p"8;tb:get#8,ft$,td$,sd$
  22. 310 ifasc(ft$+z$)<>130then350
  23. 320 ford=1to16:get#8,n$:dn$=dn$+n$:next
  24. 330 printdn$,
  25. 340 if dn$=mid$(b$+p$,1,16)then return
  26. 350 next:t=asc(nt$+z$):s=asc(ns$+z$)
  27. 360 if t then270
  28. 370 print"??? file not found!"
  29. 380 close8:close1:end
  30. 390 print#1,"u1"8;0;asc(td$)asc(sd$)
  31. 400 print#1,"b-p"8;0:get#8,t2$,s2$
  32. 410 print#1,"b-p"8;0:print#8,chr$(0)chr$(255)chr$(3)chr$(21);
  33. 420 print#1,"u2"8;0;asc(td$)asc(sd$)
  34. 430 print#1,"u1"8;0;t;s:print#1,"b-p"8;tb:print#8,chr$(131);t2$s2$pn$td$sd$;
  35. 440 ford=1to7:print#8,chr$(di(d));:next
  36. 450 print#1,"u2"8;0;t;s
  37. 460 return
  38.